// @Author: vxhly
// @Date:   2018-01-20 01:14:44 pm
// @Email:  pengchengou@gmail.com
// @Last modified by:   vxhly
// @Last modified time: 2018-03-21 11:01:58 pm
// @License: MIT

[grid] {
  display: grid;
}

[grid] img {
  object-fit: cover;
}
@for $i from 1 through 12 {
  [grid~="row-#{$i}"] {
    grid-template-rows: repeat($i, 1fr);
  }

  [grid~="col-#{$i}"] {
    grid-template-columns: repeat($i, 1fr);
  }
}

[grid="col-auto"] {
  grid-template-columns: repeat(auto-fit, minmax($min, 1fr));
}

[grid~="flow:col"] {
  grid-auto-flow: column;
}

[grid~="flow:row"] {
  grid-auto-flow: row;
}